class CreateDocumetTypes < ActiveRecord::Migration
  def self.up
    create_table :documet_types do |t|
      t.string :name
      t.integer :valleyer_id
      t.timestamps
    end
    ["未分类", "精品原创", "情感天地", "休闲搞笑"].each do |name|
      DocumetType.new(
        :name => name
      ).save!
    end
  end

  def self.down
    drop_table :documet_types
  end
end
